.class Lcom/brixd/niceapp/activity/WebViewActivity$2;
.super Landroid/webkit/WebViewClient;
.source "WebViewActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/brixd/niceapp/activity/WebViewActivity;->initWidgets()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/brixd/niceapp/activity/WebViewActivity;


# direct methods
.method constructor <init>(Lcom/brixd/niceapp/activity/WebViewActivity;)V
    .registers 2
    .param p1, "this$0"    # Lcom/brixd/niceapp/activity/WebViewActivity;

    .prologue
    .line 151
    iput-object p1, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    return-void
.end method


# virtual methods
.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .registers 5
    .param p1, "view"    # Landroid/webkit/WebView;
    .param p2, "url"    # Ljava/lang/String;

    .prologue
    .line 182
    invoke-super {p0, p1, p2}, Landroid/webkit/WebViewClient;->onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V

    .line 183
    iget-object v0, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    const/high16 v1, 0x42c80000

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/activity/WebViewActivity;->setTopProgress(F)V

    .line 184
    iget-object v0, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/activity/WebViewActivity;->setTopProgressBarVisibility(Z)V

    .line 186
    iget-object v0, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    # invokes: Lcom/brixd/niceapp/activity/WebViewActivity;->updateBtnStatus()V
    invoke-static {v0}, Lcom/brixd/niceapp/activity/WebViewActivity;->access$400(Lcom/brixd/niceapp/activity/WebViewActivity;)V

    .line 187
    return-void
.end method

.method public onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .registers 6
    .param p1, "view"    # Landroid/webkit/WebView;
    .param p2, "url"    # Ljava/lang/String;
    .param p3, "favicon"    # Landroid/graphics/Bitmap;

    .prologue
    .line 175
    invoke-super {p0, p1, p2, p3}, Landroid/webkit/WebViewClient;->onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    .line 176
    iget-object v0, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    const/high16 v1, 0x40000000

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/activity/WebViewActivity;->setTopProgress(F)V

    .line 177
    iget-object v0, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/activity/WebViewActivity;->setTopProgressBarVisibility(Z)V

    .line 178
    return-void
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .registers 8
    .param p1, "view"    # Landroid/webkit/WebView;
    .param p2, "url"    # Ljava/lang/String;

    .prologue
    .line 155
    iget-object v3, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    # getter for: Lcom/brixd/niceapp/activity/WebViewActivity;->mLinkHandler:Lcom/brixd/niceapp/util/LinkHandler;
    invoke-static {v3}, Lcom/brixd/niceapp/activity/WebViewActivity;->access$300(Lcom/brixd/niceapp/activity/WebViewActivity;)Lcom/brixd/niceapp/util/LinkHandler;

    move-result-object v3

    invoke-virtual {v3, p2}, Lcom/brixd/niceapp/util/LinkHandler;->redirectUrlToDetail(Ljava/lang/String;)Lcom/brixd/niceapp/util/LinkHandler$RedirectResult;

    move-result-object v3

    sget-object v4, Lcom/brixd/niceapp/util/LinkHandler$RedirectResult;->NOTHING:Lcom/brixd/niceapp/util/LinkHandler$RedirectResult;

    if-eq v3, v4, :cond_25

    .line 156
    new-instance v2, Ljava/util/HashMap;

    invoke-direct {v2}, Ljava/util/HashMap;-><init>()V

    .line 157
    .local v2, "map":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v3, "Url"

    invoke-virtual {v2, v3, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 158
    iget-object v3, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    invoke-virtual {v3}, Lcom/brixd/niceapp/activity/WebViewActivity;->getContext()Landroid/content/Context;

    move-result-object v3

    const-string v4, "WebViewUrlClick"

    invoke-static {v3, v4, v2}, Lcom/umeng/analytics/MobclickAgent;->onEvent(Landroid/content/Context;Ljava/lang/String;Ljava/util/Map;)V

    .line 170
    .end local v2    # "map":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    :goto_23
    const/4 v3, 0x1

    return v3

    .line 159
    :cond_25
    const-string v3, "mailto:"

    invoke-virtual {p2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_45

    .line 161
    :try_start_2d
    new-instance v1, Landroid/content/Intent;

    const-string v3, "android.intent.action.SENDTO"

    invoke-static {p2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v4

    invoke-direct {v1, v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 162
    .local v1, "intent":Landroid/content/Intent;
    iget-object v3, p0, Lcom/brixd/niceapp/activity/WebViewActivity$2;->this$0:Lcom/brixd/niceapp/activity/WebViewActivity;

    invoke-virtual {v3, v1}, Lcom/brixd/niceapp/activity/WebViewActivity;->startActivity(Landroid/content/Intent;)V
    :try_end_3d
    .catch Ljava/lang/Exception; {:try_start_2d .. :try_end_3d} :catch_3e

    goto :goto_23

    .line 163
    .end local v1    # "intent":Landroid/content/Intent;
    :catch_3e
    move-exception v0

    .line 164
    .local v0, "e":Ljava/lang/Exception;
    const-string v3, "No app to send email"

    invoke-static {v3}, Lcom/zuiapps/suite/utils/log/LogUtil;->e(Ljava/lang/String;)V

    goto :goto_23

    .line 167
    .end local v0    # "e":Ljava/lang/Exception;
    :cond_45
    invoke-virtual {p1, p2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_23
.end method
